class Student(object):
    count = 0       # 类属性，统计学生数量
    def __init__(self, name):
        self.name = name
        Student.count += 1

x1 = Student('xiaomei')
x2 = Student('xiaohong')
print('count = ', Student.count)